/*****************************************************************************
 * ui_sys_settings.h: Copyright 2023 (c) CoreLink
 * Desc:
 *
 * Author: Flying (weekend@111.com)
 * Date: 2023-09-07 16:09:41
 * Notes:
 *
 * ---------------------------------------------------------------------------
 * LastEditors:
 * LastEditTime:
 *****************************************************************************/

#ifndef UI_SYS_SETTINGS_H_
#define UI_SYS_SETTINGS_H_

#ifdef __cplusplus
extern "C"
{
#endif
    /*------------------------------- Includes ----------------------------------*/
#include "my_conf.h"
#include "lvgl.h"
    /*----------------------------- 全局定义 ------------------------------*/

    typedef struct ui_sys_settings_info_t_
    {
        lv_obj_t *cont;
        lv_obj_t *parent;

        // CPU Info
        lv_timer_t *cpu_timer;
        lv_obj_t *cpu_meter;
        lv_obj_t *cpu_label;
        lv_meter_indicator_t *cpu_indic1;
        lv_meter_indicator_t *cpu_indic2;
        lv_obj_t *cpu_chart1;
        lv_chart_series_t *cpu_ser1;
        int chart_cnt;

        // Memory Info
        lv_timer_t *mem_timer;
        lv_obj_t *mem_meter;
        lv_meter_indicator_t *mem_indic;
        lv_obj_t *mem_total_label;
        lv_obj_t *mem_free_label;
        lv_obj_t *vm_size_label;
        lv_obj_t *vm_rss_label;
        lv_obj_t *mem_per_label;

        // Temperature Info
        lv_timer_t *temp_timer;
        lv_obj_t *temp_meter;
        lv_meter_indicator_t *temp_indic;
        lv_obj_t *temp_label;
    } ui_sys_settings_info_t;

    /*----------------------------- 全局外部变量 --------------------------*/

    /*------------------------ 全局函数原型 -----------------------*/

    ui_sys_settings_info_t *ui_sys_settings_create(lv_obj_t *parent);
    int ui_sys_settings_show(ui_sys_settings_info_t *info);
    int ui_sys_settings_delete(ui_sys_settings_info_t *info);

    int ui_sys_settings_exit(ui_sys_settings_info_t *info);

#ifdef __cplusplus
}
#endif
#endif // UI_SYS_SETTINGS_H_
